//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tyr_menu\fn_keyDown.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private["_handled", "_ctrl", "_dikCode", "_shift", "_ctrlKey", "_alt"];
_ctrl = _this select 0;
_dikCode = _this select 1;
_shift = _this select 2;
_ctrlKey = _this select 3;
_alt = _this select 4;
_handled = false;

if (_dikCode in actionKeys "TeamSwitch") then {
	GVAR(ButtonUp) = true;
	if (GVAR(CONFIG_ACTION_BUTTON_TOGGLES) == 0) then {
		_handled = _this call FUNC(close);
	};
};

TRACE_1("End",_handled);
TMFPROFILERSTOP;
_handled